package com.gezi.admin.module.config.utils;


import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * 前后端交互数据标准
 * @Author 格子代码
 * @createDate 2024/2/10 09:00
 * @contact 1424529270@qq.com
 */
@Data
@Builder
public class ResultVo<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 成功标志
     */
    private boolean success;

    /**
     * 消息
     */
    private String message;

    /**
     * 返回代码
     */
    private Integer code;

    /**
     * 时间戳
     */
    private long timestamp = System.currentTimeMillis();

    /**
     * 结果对象
     */
    private T result;

    public long getTimestamp() {
        return System.currentTimeMillis();
    }
}
